diff options
| author | Factiven <[email protected]> | 2023-04-17 14:29:11 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-04-17 14:29:11 +0700 |
| commit | 89aac9ff49b696e77019e70ed5f9d91e4a112072 (patch) | |
| tree | 48bae9c98cb4cb61ef561fbf3b45040ce9820c38 /pages/anime/[...id].js | |
| parent | 2nd fixes (diff) | |
| download | moopa-89aac9ff49b696e77019e70ed5f9d91e4a112072.tar.xz moopa-89aac9ff49b696e77019e70ed5f9d91e4a112072.zip | |
3rd fixes
Diffstat (limited to 'pages/anime/[...id].js')
| -rw-r--r-- | pages/anime/[...id].js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/pages/anime/[...id].js b/pages/anime/[...id].js index 91a3eed..1df8ea4 100644 --- a/pages/anime/[...id].js +++ b/pages/anime/[...id].js @@ -615,15 +615,9 @@ export async function getServerSideProps(context) { let lastPlayed = null; if (session) { - const res = await fetch(`https://moopa-anilist.vercel.app/api/get-media`, { - method: "POST", - body: JSON.stringify({ - username: session?.user.name, - }), - headers: { - "Content-Type": "application/json", - }, - }); + const res = await fetch( + `https://moopa-anilist.vercel.app/api/get-media?username=${query.user}` + ); const resp = await fetch(`/api/get-user?userName=${session?.user.name}`); const data = await resp.json(); |